package com.itheima.health.dao;

import com.itheima.health.pojo.Role;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @author tian
 * @TIME 2023/1/7 12:34 上午
 * @description 角色Dao
 */
public interface RoleDao {

    /**
     * 根据用户ID查询角色
     *
     * @param userId
     * @return
     */
    Set<Role> selectByUserId(@Param("userId") Integer userId);

    Integer inserUserRoleByUserIdRoleId(@Param("userId") Integer userId, @Param("roleId") Integer roleId);
    List<Integer> selectRoleIdByName(String name);
}
